//
//  LSNaturalDisasterInfoTableViewCell.m
//  LaSaCivilAffairsDepartment
//
//  Created by 聂志康 on 2018/12/27.
//  Copyright © 2018 wpkj. All rights reserved.
//

#import "LSNaturalDisasterInfoTableViewCell.h"

@interface LSNaturalDisasterInfoTableViewCell ()
@property (nonatomic, strong) UIView *mainContentView;
//受灾乡镇
@property (nonatomic, strong) UILabel *townNameTipLabel;
@property (nonatomic, strong) UILabel *townNameLabel;
//受灾乡镇数量
@property (nonatomic, strong) UILabel *townNumberTipLabel;
@property (nonatomic, strong) UILabel *townNumberLabel;
//受灾面积
@property (nonatomic, strong) UILabel *areaSizeTipLabel;
@property (nonatomic, strong) UILabel *areaSizeLabel;
//发生时间
@property (nonatomic, strong) UILabel *occurTimeTipLabel;
@property (nonatomic, strong) UILabel *occurTimeLabel;
//灾害种类
@property (nonatomic, strong) UILabel *disasterKindTipLabel;
@property (nonatomic, strong) UILabel *disasterKindLabel;
//受灾人口
@property (nonatomic, strong) UILabel *peopleNumberTipLabel;
@property (nonatomic, strong) UILabel *peopleNumberLabel;
//经济损失
@property (nonatomic, strong) UILabel *economyLostTipLabel;
@property (nonatomic, strong) UILabel *economyLostLabel;
//结束时间
@property (nonatomic, strong) UILabel *endTimeTipLabel;
@property (nonatomic, strong) UILabel *endTimeLabel;
@end

@implementation LSNaturalDisasterInfoTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self.contentView addSubview:self.mainContentView];
        [self.mainContentView addSubview:self.townNameTipLabel];
        [self.mainContentView addSubview:self.townNameLabel];
        
        [self.mainContentView addSubview:self.townNumberTipLabel];
        [self.mainContentView addSubview:self.townNumberLabel];
        
        [self.mainContentView addSubview:self.areaSizeTipLabel];
        [self.mainContentView addSubview:self.areaSizeLabel];
        
        [self.mainContentView addSubview:self.occurTimeTipLabel];
        [self.mainContentView addSubview:self.occurTimeLabel];
        
        [self.mainContentView addSubview:self.disasterKindTipLabel];
        [self.mainContentView addSubview:self.disasterKindLabel];
        
        [self.mainContentView addSubview:self.peopleNumberTipLabel];
        [self.mainContentView addSubview:self.peopleNumberLabel];
        
        [self.mainContentView addSubview:self.economyLostTipLabel];
        [self.mainContentView addSubview:self.economyLostLabel];
        
        [self.mainContentView addSubview:self.endTimeTipLabel];
        [self.mainContentView addSubview:self.endTimeLabel];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
}

- (UIView *)mainContentView {
    if (!_mainContentView) {
        _mainContentView = [[UIView alloc] initWithFrame:CGRectMake(5, 5, ScreenWidth-10, LSNaturalDisasterInfoTableViewCellHeight-10)];
        _mainContentView.backgroundColor = UIColor.whiteColor;
        _mainContentView.layer.borderColor = hexColor(b6b6b6).CGColor;
        _mainContentView.layer.borderWidth = 1;
    }
    return _mainContentView;
}

//受灾乡镇
- (UILabel *)townNameTipLabel {
    if (!_townNameTipLabel) {
        _townNameTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, TipLabelWidth, 40)];
        _townNameTipLabel.backgroundColor = hexColor(EEEEEE);
        _townNameTipLabel.textAlignment = NSTextAlignmentCenter;
        _townNameTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _townNameTipLabel.layer.borderWidth = 0.5;
        _townNameTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _townNameTipLabel.text = @"受灾乡镇";
        _townNameTipLabel.numberOfLines = 3;
    }
    return _townNameTipLabel;
}

- (UILabel *)townNameLabel {
    if (!_townNameLabel) {
        _townNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth, 0, TipLabelWidth*2, 40)];
        _townNameLabel.backgroundColor = hexColor(FFFFFF);
        _townNameLabel.textAlignment = NSTextAlignmentCenter;
        _townNameLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _townNameLabel.layer.borderWidth = 0.5;
        _townNameLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _townNameLabel.numberOfLines = 3;
    }
    return _townNameLabel;
}

//受灾乡镇数量
- (UILabel *)townNumberTipLabel {
    if (!_townNumberTipLabel) {
        _townNumberTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, TipLabelHeight, TipLabelWidth, 40)];
        _townNumberTipLabel.backgroundColor = hexColor(EEEEEE);
        _townNumberTipLabel.textAlignment = NSTextAlignmentCenter;
        _townNumberTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _townNumberTipLabel.layer.borderWidth = 0.5;
        _townNumberTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _townNumberTipLabel.text = @"受灾乡镇数量";
        _townNumberTipLabel.numberOfLines = 3;
    }
    return _townNumberTipLabel;
}

- (UILabel *)townNumberLabel {
    if (!_townNumberLabel) {
        _townNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth, TipLabelHeight, TipLabelWidth*2, 40)];
        _townNumberLabel.backgroundColor = hexColor(FFFFFF);
        _townNumberLabel.textAlignment = NSTextAlignmentCenter;
        _townNumberLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _townNumberLabel.layer.borderWidth = 0.5;
        _townNumberLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _townNumberLabel.numberOfLines = 3;
    }
    return _townNumberLabel;
}

//受灾面积
- (UILabel *)areaSizeTipLabel {
    if (!_areaSizeTipLabel) {
        _areaSizeTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, TipLabelHeight*2, TipLabelWidth, 40)];
        _areaSizeTipLabel.backgroundColor = hexColor(EEEEEE);
        _areaSizeTipLabel.textAlignment = NSTextAlignmentCenter;
        _areaSizeTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _areaSizeTipLabel.layer.borderWidth = 0.5;
        _areaSizeTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _areaSizeTipLabel.text = @"受灾面积";
        _areaSizeTipLabel.numberOfLines = 3;
    }
    return _areaSizeTipLabel;
}

- (UILabel *)areaSizeLabel {
    if (!_areaSizeLabel) {
        _areaSizeLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth, TipLabelHeight*2, TipLabelWidth*2, 40)];
        _areaSizeLabel.backgroundColor = hexColor(FFFFFF);
        _areaSizeLabel.textAlignment = NSTextAlignmentCenter;
        _areaSizeLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _areaSizeLabel.layer.borderWidth = 0.5;
        _areaSizeLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _areaSizeLabel.numberOfLines = 3;
    }
    return _areaSizeLabel;
}

//发生时间
- (UILabel *)occurTimeTipLabel {
    if (!_occurTimeTipLabel) {
        _occurTimeTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, TipLabelHeight*3, TipLabelWidth, 40)];
        _occurTimeTipLabel.backgroundColor = hexColor(EEEEEE);
        _occurTimeTipLabel.textAlignment = NSTextAlignmentCenter;
        _occurTimeTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _occurTimeTipLabel.layer.borderWidth = 0.5;
        _occurTimeTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _occurTimeTipLabel.text = @"发生时间";
        _occurTimeTipLabel.numberOfLines = 3;
    }
    return _occurTimeTipLabel;
}

- (UILabel *)occurTimeLabel {
    if (!_occurTimeLabel) {
        _occurTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth, TipLabelHeight*3, TipLabelWidth*2, 40)];
        _occurTimeLabel.backgroundColor = hexColor(FFFFFF);
        _occurTimeLabel.textAlignment = NSTextAlignmentCenter;
        _occurTimeLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _occurTimeLabel.layer.borderWidth = 0.5;
        _occurTimeLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _occurTimeLabel.numberOfLines = 3;
    }
    return _occurTimeLabel;
}

//灾害种类
- (UILabel *)disasterKindTipLabel {
    if (!_disasterKindTipLabel) {
        _disasterKindTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*3, 0, TipLabelWidth, 40)];
        _disasterKindTipLabel.backgroundColor = hexColor(EEEEEE);
        _disasterKindTipLabel.textAlignment = NSTextAlignmentCenter;
        _disasterKindTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _disasterKindTipLabel.layer.borderWidth = 0.5;
        _disasterKindTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _disasterKindTipLabel.text = @"灾害种类";
        _disasterKindTipLabel.numberOfLines = 3;
    }
    return _disasterKindTipLabel;
}

- (UILabel *)disasterKindLabel {
    if (!_disasterKindLabel) {
        _disasterKindLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*4, 0, TipLabelWidth*2, 40)];
        _disasterKindLabel.backgroundColor = hexColor(FFFFFF);
        _disasterKindLabel.textAlignment = NSTextAlignmentCenter;
        _disasterKindLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _disasterKindLabel.layer.borderWidth = 0.5;
        _disasterKindLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _disasterKindLabel.numberOfLines = 3;
    }
    return _disasterKindLabel;
}

//受灾人口
- (UILabel *)peopleNumberTipLabel {
    if (!_peopleNumberTipLabel) {
        _peopleNumberTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*3, TipLabelHeight, TipLabelWidth, 40)];
        _peopleNumberTipLabel.backgroundColor = hexColor(EEEEEE);
        _peopleNumberTipLabel.textAlignment = NSTextAlignmentCenter;
        _peopleNumberTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _peopleNumberTipLabel.layer.borderWidth = 0.5;
        _peopleNumberTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _peopleNumberTipLabel.text = @"受灾人口";
        _peopleNumberTipLabel.numberOfLines = 3;
    }
    return _peopleNumberTipLabel;
}

- (UILabel *)peopleNumberLabel {
    if (!_peopleNumberLabel) {
        _peopleNumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*4, TipLabelHeight, TipLabelWidth*2, 40)];
        _peopleNumberLabel.backgroundColor = hexColor(FFFFFF);
        _peopleNumberLabel.textAlignment = NSTextAlignmentCenter;
        _peopleNumberLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _peopleNumberLabel.layer.borderWidth = 0.5;
        _peopleNumberLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _peopleNumberLabel.numberOfLines = 3;
    }
    return _peopleNumberLabel;
}

//经济损失
- (UILabel *)economyLostTipLabel {
    if (!_economyLostTipLabel) {
        _economyLostTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*3, TipLabelHeight*2, TipLabelWidth, 40)];
        _economyLostTipLabel.backgroundColor = hexColor(EEEEEE);
        _economyLostTipLabel.textAlignment = NSTextAlignmentCenter;
        _economyLostTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _economyLostTipLabel.layer.borderWidth = 0.5;
        _economyLostTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _economyLostTipLabel.text = @"经济损失";
        _economyLostTipLabel.numberOfLines = 3;
    }
    return _economyLostTipLabel;
}

- (UILabel *)economyLostLabel {
    if (!_economyLostLabel) {
        _economyLostLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*4, TipLabelHeight*2, TipLabelWidth*2, 40)];
        _economyLostLabel.backgroundColor = hexColor(FFFFFF);
        _economyLostLabel.textAlignment = NSTextAlignmentCenter;
        _economyLostLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _economyLostLabel.layer.borderWidth = 0.5;
        _economyLostLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _economyLostLabel.numberOfLines = 3;
    }
    return _economyLostLabel;
}

//结束时间
- (UILabel *)endTimeTipLabel {
    if (!_endTimeTipLabel) {
        _endTimeTipLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*3, TipLabelHeight*3, TipLabelWidth, 40)];
        _endTimeTipLabel.backgroundColor = hexColor(EEEEEE);
        _endTimeTipLabel.textAlignment = NSTextAlignmentCenter;
        _endTimeTipLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _endTimeTipLabel.layer.borderWidth = 0.5;
        _endTimeTipLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _endTimeTipLabel.text = @"结束时间";
        _endTimeTipLabel.numberOfLines = 3;
    }
    return _endTimeTipLabel;
}

- (UILabel *)endTimeLabel {
    if (!_endTimeLabel) {
        _endTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(TipLabelWidth*4, TipLabelHeight*3, TipLabelWidth*2, 40)];
        _endTimeLabel.backgroundColor = hexColor(FFFFFF);
        _endTimeLabel.textAlignment = NSTextAlignmentCenter;
        _endTimeLabel.layer.borderColor = hexColor(b6b6b6).CGColor;
        _endTimeLabel.layer.borderWidth = 0.5;
        _endTimeLabel.font = [UIFont fontWithName:@"SourceHanSansCN-Regular" size:10];
        _endTimeLabel.numberOfLines = 3;
    }
    return _endTimeLabel;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
